import requests
from init.celery import celery


# celery使用方式3：延迟任务
@celery.task
def crwal_info():
    url = "http://www.baidu.com"
    response = requests.get(url).status_code
    print(response)
    return {"code": 0, "msg": "success", "data": response}
